/*
 * @Description: sh命令操作
 * @Author: 听风
 * @Date: 2020-12-24 16:27:21
 */

const { exec } = require('child_process');

const runExec = comd => {
  return new Promise((resolve, reject) => {
    exec(comd, (error, stdout, stderr) => {
      if (error) {
        reject(error, stderr);
      }
      resolve(stdout);
    });
  });
};

module.exports = {
  runExec,
};
